package com.example.identifyvisio.model.component;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.text.DecimalFormat;

/*
位置
 */
@Data
@NoArgsConstructor
public class Position {
    private double x;
    private double y;

    public Position(double pinX, double pinY) {
        DecimalFormat df = new DecimalFormat("#.0");
        this.y = Double.parseDouble(df.format (pinY));
        this.x = Double.parseDouble(df.format (pinX));
    }
}
